#include <iostream> 
#include <algorithm>
#include <functional>

using namespace std;

template <typename T>
void Sort(T a[], int n) {
	sort(a, a+n, greater<T>());
}

int main() {
	int a[5] = {1, 5, 3, 4, 2};
	
	Sort(a, 5);
	cout << a[2] << endl;
	return 0;
}



